/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Resource-Tag-APIs
资源标签接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKResourcetag/ResourcetagApiModel.h>


@implementation ResourcetagQueryResourceResult
-(id) initWithResourceIds:(NSArray<NSString*>*) resourceIds { 
    self.resourceIds = resourceIds;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceIds])
    {
        [result setValue:[self resourceIds] forKey:@"resourceIds"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceIds = [dictionary objectForKey:@"resourceIds"];
    return self;
} 

@end
@implementation ResourcetagDescribeTagsRequest
-(id) initWithRegion:(NSString *)regionId
tagKeysVo:(TagsReqVo*)tagKeysVo { 
    self.regionId = regionId;
    self.tagKeysVo = tagKeysVo;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
tagKeysVo:(TagsReqVo*)tagKeysVo { 
    self.regionId = regionId;
    self.version = version;
    self.tagKeysVo = tagKeysVo;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self tagKeysVo])
    {
        [result setValue:[[self tagKeysVo] dictionary]forKey:@"tagKeysVo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKeysVo = [[TagsReqVo alloc]initWithDic:[dictionary objectForKey:@"tagKeysVo"]];
    return self;
} 

@end
  
@implementation ResourcetagQueryResourceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
ResourcetagQueryResourceResult* result = [[ResourcetagQueryResourceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(ResourcetagQueryResourceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation ResourcetagDescribeTagsResult
-(id) initWithData:(TagsResVo*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[TagsResVo alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation ResourcetagDescribeTagsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
ResourcetagDescribeTagsResult* result = [[ResourcetagDescribeTagsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(ResourcetagDescribeTagsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation ResourcetagTagResourcesRequest
-(id) initWithRegion:(NSString *)regionId
tagResources:(TagResourcesReqVo*)tagResources { 
    self.regionId = regionId;
    self.tagResources = tagResources;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
tagResources:(TagResourcesReqVo*)tagResources { 
    self.regionId = regionId;
    self.version = version;
    self.tagResources = tagResources;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self tagResources])
    {
        [result setValue:[[self tagResources] dictionary]forKey:@"tagResources"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagResources = [[TagResourcesReqVo alloc]initWithDic:[dictionary objectForKey:@"tagResources"]];
    return self;
} 

@end
@implementation ResourcetagDescribeResourcesResult
-(id) initWithData:(ResourceResVo*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[ResourceResVo alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation ResourcetagDescribeResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
ResourcetagDescribeResourcesResult* result = [[ResourcetagDescribeResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(ResourcetagDescribeResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation ResourcetagQueryResourceRequest
-(id) initWithRegion:(NSString *)regionId
queryResource:(QueryResourceReqVo*)queryResource { 
    self.regionId = regionId;
    self.queryResource = queryResource;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
queryResource:(QueryResourceReqVo*)queryResource { 
    self.regionId = regionId;
    self.version = version;
    self.queryResource = queryResource;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self queryResource])
    {
        [result setValue:[[self queryResource] dictionary]forKey:@"queryResource"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.queryResource = [[QueryResourceReqVo alloc]initWithDic:[dictionary objectForKey:@"queryResource"]];
    return self;
} 

@end
@implementation ResourcetagTagResourcesResult
-(id) initWithData:(TagResourcesResVo*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[TagResourcesResVo alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation ResourcetagTagResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
ResourcetagTagResourcesResult* result = [[ResourcetagTagResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(ResourcetagTagResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation ResourcetagUnTagResourcesRequest
-(id) initWithRegion:(NSString *)regionId
unTagResources:(UnTagResourcesReqVo*)unTagResources { 
    self.regionId = regionId;
    self.unTagResources = unTagResources;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
unTagResources:(UnTagResourcesReqVo*)unTagResources { 
    self.regionId = regionId;
    self.version = version;
    self.unTagResources = unTagResources;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self unTagResources])
    {
        [result setValue:[[self unTagResources] dictionary]forKey:@"unTagResources"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.unTagResources = [[UnTagResourcesReqVo alloc]initWithDic:[dictionary objectForKey:@"unTagResources"]];
    return self;
} 

@end
@implementation ResourcetagDescribeResourcesRequest
-(id) initWithRegion:(NSString *)regionId
resourceVo:(ResourceReqVo*)resourceVo { 
    self.regionId = regionId;
    self.resourceVo = resourceVo;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
resourceVo:(ResourceReqVo*)resourceVo { 
    self.regionId = regionId;
    self.version = version;
    self.resourceVo = resourceVo;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self resourceVo])
    {
        [result setValue:[[self resourceVo] dictionary]forKey:@"resourceVo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceVo = [[ResourceReqVo alloc]initWithDic:[dictionary objectForKey:@"resourceVo"]];
    return self;
} 

@end
@implementation ResourcetagUnTagResourcesResult
-(id) initWithData:(UnTagResourcesResVo*) data { 
    self.data = data;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[UnTagResourcesResVo alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation ResourcetagUnTagResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
ResourcetagUnTagResourcesResult* result = [[ResourcetagUnTagResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(ResourcetagUnTagResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
